<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <!-- load css -->
    <link rel="stylesheet" type="text/css" th:href="@{/plugin/layui/css/font/iconfont.css}" media="all"/>
    <link rel="stylesheet" type="text/css" th:href="@{/plugin/layui/js/layui/css/layui.css}"  media="all"/>
    <link rel="stylesheet" type="text/css" th:href="@{/plugin/layui/css/main.css}" media="all"/>
    <link rel="stylesheet" type="text/css" th:href="@{/plugin/bootstrap/bootstrap/css/bootstrap.min.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/plugin/bootstrap-table/bootstrap-table.css}"/>

</head>
<body>
<div class="layui-fluid larry-wrapper">
    <div class="layui-row layui-col-space30">
        <div class="layui-col-xs24">
            <!--头部搜索-->
            <section class="panel panel-padding">
                <form class="layui-form" action="" method="get">
                    <div class="layui-form">
                        <div class="layui-inline">
                            <select name="city" lay-verify="required">
                                <option value="0">请选择分类</option>
                                <option value="010">北京</option>
                                <option value="021">上海</option>
                                <option value="0571">杭州</option>
                            </select>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <input class="layui-input start-date" name="start_date" placeholder="入驻时间"/>
                            </div>
                            <div class="layui-input-inline">
                                <input class="layui-input end-date" name="end_date" placeholder="入驻时间"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <input class="layui-input" name="keyword" placeholder="关键字"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <a class="layui-btn layui-btn-xs  layui-btn-primary search-btn">查找</a>
                        </div>
                    </div>
                </form>
            </section>

            <!--列表-->
            <section class="panel panel-padding">
                <div class="group-button">
                    <a class="layui-btn layui-btn-sm layui-btn-danger">
                        <i class="iconfont">&#xe626;</i> 删除
                    </a>
                    <a class="layui-btn layui-btn-sm layui-btn-normal add-btn">
                        <i class="layui-icon">&#x1005;</i> 添加
                    </a>
                    <a class="layui-btn layui-btn-sm modal" data-params='{"content": "brand-edit.html",type:2, "title": "添加品牌"}'>
                        <i class="iconfont">&#xe649;</i> 添加
                    </a>
                </div>
                <div class="layui-form pro">
                    <table id="table"></table>
                    <!--<table class="layui-table" lay-data="{height:'full-200', url:'/zxwms/plugin/layui/data/article.json',page:'true', id:'test'}" lay-filter="article">-->
                        <!--<thead>-->
                        <!--<tr>-->
                            <!--<th lay-data="{checkbox:true}"></th>-->
                            <!--<th lay-data="{field:'id', width:80, sort: true}">序号</th>-->
                            <!--<th lay-data="{field:'img', toolbar: '#barPic', width:100}">LOGO</th>-->
                            <!--<th lay-data="{field:'title', width:370}">名称</th>-->
                            <!--<th lay-data="{field:'order', width:80, edit:'text', sort: true}">排序</th>-->
                            <!--<th lay-data="{field:'status',toolbar: '#switch', width:80}">审核</th>-->
                            <!--<th lay-data="{fixed: 'right', width:170, align:'center', toolbar: '#barDemo'}">操作</th>-->
                        <!--</tr>-->
                        <!--</thead>-->
                    <!--</table>-->
                </div>
            </section>
        </div>
    </div>
</div>

</body>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs  layui-btn-primary" lay-event="detail">查看</a>
    <a class="layui-btn layui-btn-xs  layui-btn-primary modal" data-params='{content: "brand-edit.html",data:"id={{ d.id }}",type:"2", title: "{{d.title }}"}' lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="switch">
    {{# if(d.switch ){ }}
    <input type="checkbox" name="switch" lay-skin="switch" lay-text="ON|OFF" checked="checked" /> {{# }else{ }}
    <input type="checkbox" name="switch" lay-skin="switch" lay-text="ON|OFF" /> {{# } }}
</script>

<script type="text/html" id="barPic">
    <div class="imgbox"><img th:src="@{/plugin/layui/images/upload.jpg}" alt=""/></div>
</script>

<script type="text/javascript" th:src="@{/plugin/layui/js/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/plugin/layui/js/version.js}"></script>
<script th:src="@{/plugin/layui/js/common.js}"></script>
<script th:src="@{/plugin/bootstrap/jquery.min.js}"></script>
<script th:src="@{/plugin/bootstrap/bootstrap4/js/popper.min.js}"></script>
<script th:src="@{/plugin/bootstrap/bootstrap4/js/bootstrap.min.js}"></script>

<script th:src="@{/plugin/bootstrap-table/bootstrap-table.js}"></script>
<script th:src="@{/plugin/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>

<script th:src="@{/plugin/bootstrap-table/locale/bootstrap-table-zh-CN.js}"></script>
<script>
    layui.use(['list','layer','zzpUtils','jquery'],function () {
        var zzpUtils= layui.zzpUtils,
            $ = layui.jquery;
        zzpUtils.table({
            elem: '#table',
            isApi: true,
            pagination:true,
            url: '/zxwms/wmsownersupplier/list',
            columns: [{
                field: '',
                checkbox: true
            }, {
                field: 'mc',
                title: '货主名称'
            },{
                field: 'lxr',
                title: '联系人'
            },{
                field: 'dz',
                title: '地址'
            },{
                field: 'beanName',
                title: '实体bean名称'
            },{
                field: 'formType',
                title: '表单类型'
            }],
            queryParams: function () {//查询条件
                return {
                    formName: "12312321321"
                };
            },
            detailFormatter: function (index, row) {
                return "这里就没有确定过11";
            }

        });
        $(".search-btn").on('click',function () {
            zzpUtils.refreshTable("#table");
        })
        $(".add-btn").on('click',function () {
            var index = top.layui.layer.open({
                title : "添加用户",
                type : 2,
                content : "12312",
                success : function(layero, index){

//                    var body = layui.layer.getChildFrame('body', index);
//                    if(edit){
//                        body.find(".userName").val(edit.userName);  //登录名
//                        body.find(".userEmail").val(edit.userEmail);  //邮箱
//                        body.find(".userSex input[value="+edit.userSex+"]").prop("checked","checked");  //性别
//                        body.find(".userGrade").val(edit.userGrade);  //会员等级
//                        body.find(".userStatus").val(edit.userStatus);    //用户状态
//                        body.find(".userDesc").text(edit.userDesc);    //用户简介
//                        form.render();
//                    }
//                    setTimeout(function(){
//                        layui.layer.tips('点击此处返回用户列表', '.layui-layer-setwin .layui-layer-close', {
//                            tips: 3
//                        });
//                    },500)
                }
            });
            setTimeout(function(){
                top.layui.layer.tips('点击此处返回用户列表', '.layui-layer-setwin .layui-layer-close', {
                    tips: 3
                });
            },500)
            top.layui.layer.full(index);
            //改变窗口大小时，重置弹窗的宽高，防止超出可视区域（如F12调出debug的操作）
            $(window).on("resize",function(){
                top.layui.layer.full(index);
            })
        })

    });
</script>
</html>